package com.googlecode.imanager.swing.form;

import javax.swing.JButton;

import com.googlecode.imanager.client.bridge.form.IButton;
import com.googlecode.imanager.client.form.Button;
import com.googlecode.imanager.core.base.BridgeApplication;

/**
 * @author wellsantos@wellsantos.com
 * @since 0.01
 */
public class SwingButton extends SwingFocusControl implements IButton {

    public SwingButton(BridgeApplication bridge, Button source) {
        super(bridge, source);
    }

    @Override
    protected JButton createTarget() {
        return new JButton();
    }

    @Override
    public JButton getTarget(){
        return (JButton) target;
    }
    
    @Override
    public Button getSource() {
        return (Button) source;
    }

    @Override
    public void setText(String text) {
        getTarget().setText(text);
    }

}
